package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class OSWDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos=new FileOutputStream("ows.txt");
        OutputStreamWriter osw=new OutputStreamWriter(fos, StandardCharsets.UTF_8);//指定字符集
        String line ="我期待的不是雪,而是有你的冬天";

        osw.write(line);
        System.out.println("写出完毕");

        osw.close();
    }
}
